<?php

function array_unique_fb($array2D) {
foreach ($array2D as $v) {
$v = join(",", $v); //降维,也可以用implode,将一维数组转换为用逗号连接的字符串

$temp[] = $v;

}
$temp = array_unique($temp);//去掉重复的字符串,也就是重复的一维数组
foreach ($temp as $k => $v) {
$temp[$k] = explode(",", $v);//再将拆开的数组重新组装
}
return $temp;
}

$aa = array(
array('id' => 123, 'name' => '张三','age'=>12111),
    array('id' => 123, 'name' => '张三'),
array('id' => 123, 'name' => '李四'),

array('id' => 124, 'name' => '王五'),

array('id' => 123, 'name' => '李四'),

array('id' => 126, 'name' => '赵六')

array('test_code_old' => 1513, 'test_code' => '1511')
);

$bb = array_unique_fb($aa);

print_r($bb);
?>